<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>用户注册</title>
<script type="text/javascript" src="./js/jquery-1.4.1.js"></script>
<script type="text/javascript" src="./js/datacheck.js"></script>
<link rel="stylesheet" type="text/css" href="./js/jquery-ui-1.8rc1.custom.css" />
<script type="text/javascript" src="./js/jquery.ui.core.js"></script>
<script type="text/javascript" src="./js/jquery.ui.widget.js"></script>
<script type="text/javascript" src="./js/jquery.ui.datepicker.js"></script>
</head>
<body>
<form action="./signup.php" method="post" name="signup" onsubmit="return false;">
	<table>
		<tr><td>用户名</td><td><input type="text" name="username"></input></td></tr>
		<tr><td>密码</td><td><input type="password" name="password"></input></td></tr>
		<tr><td>再输一次</td><td><input type="password" name="password2"></input></td></tr>
		<tr><td>验证码</td>
			<td>
				{literal}
				<input type="text" value="请输入验证码" onfocus="if(value=='请输入验证码') {value=''}" maxlength="5" onblur="if (value=='') {value='请输入验证码'}" style="width:78px;" name="captcha"/>
				<a href="javascript:void(0);" onclick="document.getElementById('captcha').src='captcha.php?'+Math.random();return false;"><img src="captcha.php" id="captcha" style="border:0px;width:90px;height:26px" /></a>
				<a href="javascript:void(0);" style="margin-left:5px;" onclick="document.getElementById('captcha').src='captcha.php?'+Math.random();return false;">换一张</a>
				{/literal}
			</td>
		</tr>
		<tr><td colspan="2"><button onclick="document.signup.submit()">注册</button></td></tr>
	</table>
</form>
</body>
{literal}
<script>
	$(function() {
		var dates = $("#birthdate").datepicker({
			autoSize: true,
			defaultDate: "-1m",
			changeYear: true,
			yearRange: '-80:+0',
			changeMonth: true,
			numberOfMonths: 1,
			showButtonPanel : true,
			monthNames: ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'],
			monthNamesShort: ['一','二','三','四','五','六','七','八','九','十','十一','十二'],
			dateFormat: 'yy-mm-dd',
			onSelect: function( selectedDate ) {
				//var option = this.id == "birthdate" ? "minDate" : "maxDate",
				instance = $( this ).data( "datepicker" ),
				date = $.datepicker.parseDate(
				instance.settings.dateFormat ||
				$.datepicker._defaults.dateFormat,
				selectedDate, instance.settings );
				dates.not( this ).datepicker( "option", option, date );
			}
		});
	});
</script>
{/literal}
</html>